package com.hzqy.persistence.dao.template;

import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.hzqy.persistence.dao.core.PersistenceDao;
import com.hzqy.web.vo.CmContentVo;
import com.hzqy.web.vo.CmSeriesVo;
import com.hzqy.web.vo.industry.C2BascHistryVo;
import com.hzqy.web.vo.template.EpgGroupVo;
import com.hzqy.web.vo.template.TemplateIssuedVo;
@Repository
public class TemplateDao extends PersistenceDao<TemplateIssuedVo, Integer>{
	protected final Logger LOG = LoggerFactory.getLogger(getClass());

	public int selectTemplateCount(TemplateIssuedVo templateIssuedVo) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "selectTemplateCount", templateIssuedVo);
	}

	public List<TemplateIssuedVo> selectTemplateList(Map<String, Object> map) {
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectTemplateList", map);
	}

	public Integer insertTemplate(TemplateIssuedVo templateIssuedVo) {
		String namespace = this.getNamespace();
		return getSqlSession().insert(namespace + "insertTemplate", templateIssuedVo);
	}

	public int selectEpgGroupCount(EpgGroupVo epgGroupVo) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "selectEpgGroupCount", epgGroupVo);
	}

	public List<EpgGroupVo> selectEpgGroupList(Map<String, Object> map) {
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectEpgGroupList", map);
	}

	public Integer insertEpgGroup(EpgGroupVo epgGroupVo) {
		String namespace = this.getNamespace();
		return getSqlSession().insert(namespace + "insertEpgGroup", epgGroupVo);
	}

	public List<C2BascHistryVo> selectC1BascHistroyByContentId(int f_cti_id) {
		return getSqlSession().selectList(this.getNamespace() + "selectC1BascHistroyByContentId", f_cti_id);
	}
}
